<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QSculpt: BOManager Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QSculpt
   &#160;<span id="projectnumber">0.0.1a</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">BOManager Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="BOManager" -->
<p><code>#include &lt;<a class="el" href="_b_o_manager_8h_source.html">BOManager.h</a>&gt;</code></p>

<p><a href="class_b_o_manager-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7cbbe93471d9dab3e7d3c1e65ea8a906"></a><!-- doxytag: member="BOManager::invalidateBO" ref="a7cbbe93471d9dab3e7d3c1e65ea8a906" args="(ISurface *obj)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>invalidateBO</b> (<a class="el" href="class_i_surface.html">ISurface</a> *obj)</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_vertex_buffer.html">VertexBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#a5fbaabe91827f5feb4f958928a88e0ee">createVBO</a> (const QString &amp;poolName, <a class="el" href="class_i_surface.html">ISurface</a> *mesh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f0c167c52824fdcce9e4e77755447f6"></a><!-- doxytag: member="BOManager::createIBO" ref="a1f0c167c52824fdcce9e4e77755447f6" args="(const QString &amp;poolName, ISurface *mesh)" -->
<a class="el" href="class_index_buffer.html">IndexBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>createIBO</b> (const QString &amp;poolName, <a class="el" href="class_i_surface.html">ISurface</a> *mesh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#ac6f9c5c2402ad8740cfbaeab69d68dee">destroyBO</a> (const QString &amp;poolName, <a class="el" href="class_buffer_object.html">BufferObject</a> *vbo)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#a1ea8a8d3175a0401462963c78eebe547">destroyAllMeshBO</a> (const <a class="el" href="class_i_surface.html">ISurface</a> *mesh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#aaa80c7fa95f574e610a60a2e06e7f485">destroyPool</a> (const QString &amp;poolName)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_i_surface.html">ISurface</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#a23c6c491928174215394b4d45893eb94">getMesh</a> (const <a class="el" href="class_buffer_object.html">BufferObject</a> *vbo)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_vertex_buffer.html">VertexBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_b_o_manager.html#abae074839eb7370067a30cd2107e118a">getVBO</a> (const QString &amp;poolName, <a class="el" href="class_i_surface.html">ISurface</a> *mesh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e4d409b4d20c3d99c8a191bd6d2d488"></a><!-- doxytag: member="BOManager::getIBO" ref="a2e4d409b4d20c3d99c8a191bd6d2d488" args="(const QString &amp;poolName, ISurface *mesh)" -->
<a class="el" href="class_index_buffer.html">IndexBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getIBO</b> (const QString &amp;poolName, <a class="el" href="class_i_surface.html">ISurface</a> *mesh)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9195b09b10698f52cfcc560d2b90595a"></a><!-- doxytag: member="BOManager::getInstance" ref="a9195b09b10698f52cfcc560d2b90595a" args="()" -->
static <a class="el" href="class_b_o_manager.html">BOManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class to manage all vertex buffer objects in the application.</p>
<p>Only one manager should exists at any time in the application.</p>
<p>TODO: describes the pool part on this class </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5fbaabe91827f5feb4f958928a88e0ee"></a><!-- doxytag: member="BOManager::createVBO" ref="a5fbaabe91827f5feb4f958928a88e0ee" args="(const QString &amp;poolName, ISurface *mesh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_vertex_buffer.html">VertexBuffer</a> * BOManager::createVBO </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>poolName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_i_surface.html">ISurface</a> *&#160;</td>
          <td class="paramname"><em>mesh</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a vertex buffer objects and stablish a relationship between the buffer object created and an object mesh.</p>
<p>The same mesh can be binded to differents buffers objects. By doing this, the same 3d data can be represented in different ways by different buffer objects.</p>
<p>The pointer returned should not be deleted by the caller of the function. To free the resources of the buffer objects call destroyBO function.</p>
<p>TODO: describe the notion of pool's on this class. </p>

</div>
</div>
<a class="anchor" id="a1ea8a8d3175a0401462963c78eebe547"></a><!-- doxytag: member="BOManager::destroyAllMeshBO" ref="a1ea8a8d3175a0401462963c78eebe547" args="(const ISurface *mesh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BOManager::destroyAllMeshBO </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_i_surface.html">ISurface</a> *&#160;</td>
          <td class="paramname"><em>mesh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Free all the BOs binded to an specific mesh.</p>
<p>This can be used when a mesh is deleted to unbind and free all the memory used by the BOs. </p>

</div>
</div>
<a class="anchor" id="ac6f9c5c2402ad8740cfbaeab69d68dee"></a><!-- doxytag: member="BOManager::destroyBO" ref="ac6f9c5c2402ad8740cfbaeab69d68dee" args="(const QString &amp;poolName, BufferObject *vbo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BOManager::destroyBO </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>poolName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_buffer_object.html">BufferObject</a> *&#160;</td>
          <td class="paramname"><em>vbo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Free the buffer object resources.</p>
<p>This method should be called to free the resources of the buffer objects. Free the memory used by the buffer objects and delete the relationship of the buffer object with the mesh stablished with Create*BO </p>

</div>
</div>
<a class="anchor" id="aaa80c7fa95f574e610a60a2e06e7f485"></a><!-- doxytag: member="BOManager::destroyPool" ref="aaa80c7fa95f574e610a60a2e06e7f485" args="(const QString &amp;poolName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BOManager::destroyPool </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>poolName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Free all the BOs under a named pool.</p>
<p>This can be used when a mesh is deleted to unbind and free all the memory used by the BOs. </p>

</div>
</div>
<a class="anchor" id="a23c6c491928174215394b4d45893eb94"></a><!-- doxytag: member="BOManager::getMesh" ref="a23c6c491928174215394b4d45893eb94" args="(const BufferObject *vbo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_i_surface.html">ISurface</a> * BOManager::getMesh </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_buffer_object.html">BufferObject</a> *&#160;</td>
          <td class="paramname"><em>vbo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the 3D object binded to the specified buffer object. </p>

</div>
</div>
<a class="anchor" id="abae074839eb7370067a30cd2107e118a"></a><!-- doxytag: member="BOManager::getVBO" ref="abae074839eb7370067a30cd2107e118a" args="(const QString &amp;poolName, ISurface *mesh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_vertex_buffer.html">VertexBuffer</a> * BOManager::getVBO </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>poolName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_i_surface.html">ISurface</a> *&#160;</td>
          <td class="paramname"><em>mesh</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the BO associated to the mesh inside an specific BO pool. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>engine/include/<a class="el" href="_b_o_manager_8h_source.html">BOManager.h</a></li>
<li>engine/src/BOManager.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sat Aug 27 2011 15:38:53 for QSculpt by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
